/*
 * Creation : 27/09/2013
 */
/**
 * 
 */
package com.japcatalog.bo.service.impl;

import java.util.Collection;

import com.japcatalog.bo.AutoPart;
import com.japcatalog.bo.dao.AutoPartDao;
import com.japcatalog.bo.dao.impl.AutoPartDaoImpl;
import com.japcatalog.bo.service.AutoPartService;

/**
 * The Class AutoPartServiceImpl.
 * 
 * @author Fernando Ariel Perelli
 */
public class AutoPartServiceImpl implements AutoPartService {

	/** The auto part dao. */
	private AutoPartDao autoPartDao = new AutoPartDaoImpl();

	/**
	 * Getter autoPartDao.
	 * 
	 * @return the autoPartDao
	 */
	public AutoPartDao getAutoPartDao() {
		return autoPartDao;
	}

	/**
	 * Setter autoPartDao.
	 * 
	 * @param autoPartDao
	 *            the autoPartDao to set
	 */
	public void setAutoPartDao(AutoPartDao autoPartDao) {
		this.autoPartDao = autoPartDao;
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see com.japcatalog.bo.service.AutoPartService#findById(java.lang.Long)
	 */
	@Override
	public AutoPart findById(Long id) {
		return this.autoPartDao.findById(id);
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see com.japcatalog.bo.service.AutoPartService#findALL()
	 */
	@Override
	public Collection<AutoPart> findALL() {
		return this.autoPartDao.findAll();
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see com.japcatalog.bo.service.AutoPartService#create(com.japcatalog.bo.AutoPart)
	 */
	@Override
	public Long create(AutoPart autoPart) {
		return this.autoPartDao.create(autoPart);
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see com.japcatalog.bo.service.AutoPartService#update(com.japcatalog.bo.AutoPart)
	 */
	@Override
	public void update(AutoPart autoPart) {
		this.autoPartDao.update(autoPart);
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see com.japcatalog.bo.service.AutoPartService#delete(com.japcatalog.bo.AutoPart)
	 */
	@Override
	public void delete(AutoPart autoPart) {
		this.autoPartDao.delete(autoPart);
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see com.japcatalog.bo.service.AutoPartService#delete(java.lang.Long)
	 */
	@Override
	public void delete(Long id) {
		this.autoPartDao.delete(id);
	}

}
